import urllib.parse

print(urllib.parse.quote("西游记"))

data = {
    "name":"孙悟空",
    "sex":"男",
    "addr":"花果山"
}

print(urllib.parse.urlencode(data))
